package main

import (
	"container/ring"
	"fmt"
)

func main() {
	r := ring.New(4)
	ll := r.Len()

	for i := 0; i < ll; i++ {
		r.Value = i + 1
		r = r.Next()
	}
	rr := r.Unlink(2)
	rr.Do(func(a any) {
		fmt.Println(a)
	})
}
